package com.sc.nft.req.pointsrule;

import com.sc.nft.enums.PointsRuleTimeEnum;
import com.sc.nft.enums.PointsRuleValidityEnum;
import com.sc.nft.req.OperatorReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author JYT
 * @create 2024/5/8 11:37
 */
@Data
public class PointsRuleReq extends OperatorReq {
    private Long id;
    /**
     * 积分名称
     */
    @Length(max = 5, message = "积分名称长度不能超过5")
    @ApiModelProperty(value = "积分名称")
    private String pointsRuleName;
    /**
     * 积分有效期
     */
    @NotNull(message = "积分有效期不能为空")
    @ApiModelProperty(value = "积分有效期 FOREVER永久有效 ,AFTER_TIME从获得开始多少天、月、年内有效")
    private PointsRuleValidityEnum validity;
    /**
     * 积分有效期单位
     */
    @ApiModelProperty(value = "积分有效期单位 DAY 天,MONTH 月,YEAR 年")
    private PointsRuleTimeEnum validityTimeUnit;
    /**
     * 积分有效期时间
     */
    @ApiModelProperty(value = "积分有效期时间")
    private Integer validityTime;
    /**
     * 积分规则介绍图
     */
    @ApiModelProperty(value = "积分规则介绍图")
    @NotNull(message = "积分规则介绍图不能为空")
    private String pointsRuleImg;
    /**
     * 消费奖励:每消费 1 元，获得多少积分
     */
    @ApiModelProperty(value = "消费奖励")
    @NotNull(message = "消费奖励不能为空")
    private BigDecimal consumeReward;
    /**
     * 邀请奖励:每邀请 1 个用户注册，获得多少积分
     */
    @ApiModelProperty(value = "邀请奖励")
    private BigDecimal inviteReward;

}
